﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="ThongKeDoanhThu.aspx.cs" Inherits="admin_ThongKeDoanhThu" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="MyUserControls/TH_ChiTietDonDatHangAdmin.ascx" tagname="TH_ChiTietDonDatHangAdmin" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <span class="AdminTitle" style="color:#cc0000;">Thống kê doanh thu</span>
    <br />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <span class="AdminPageText">
        Thống kê doanh thu trong khoảng từ
        <asp:TextBox ID="startDateTextBox" runat="server" Width="150px" />
        <asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="images/Calendar.png" AlternateText="Click here to display calendar" Width="20" Height="20" style="margin-bottom:-6px;"/>
        <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="startDateTextBox" PopupButtonID="ImageButton1" Format="dd/MM/yyyy">
        </cc1:CalendarExtender>
        tới
        <asp:TextBox ID="endDateTextBox" runat="server" Width="150px" />
        <asp:ImageButton runat="Server" ID="ImageButton2" ImageUrl="images/Calendar.png" AlternateText="Click here to display calendar" Width="20" Height="20" style="margin-bottom:-6px;"/>
        <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="endDateTextBox" PopupButtonID="ImageButton2" Format="dd/MM/yyyy">
        </cc1:CalendarExtender>
        <asp:Button ID="byDateGo" runat="server" CssClass="SmallButtonText" Text="Go" 
            CausesValidation="False" onclick="byDateGo_Click" />
        <br />
        <asp:Label ID="errorLabel" runat="server" CssClass="AdminErrorText" 
            EnableViewState="False"></asp:Label>
        <br />
        Tổng doanh thu: <asp:Label ID="lblDoanhThu" runat="server" Text="" Font-Bold="True"></asp:Label>
        <br />
        <br />
        <asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="id" onselectedindexchanged="grid_SelectedIndexChanged" AllowPaging="False">
            <Columns>
                <asp:BoundField DataField="NgayDatHang" HeaderText="Ngày đặt hàng" 
                    ReadOnly="True" SortExpression="NgayDatHang" />
                <asp:BoundField DataField="NgayGiaoHang" HeaderText="Ngày giao hàng" 
                    ReadOnly="True" SortExpression="NgayGiaoHang" />
                <asp:CheckBoxField DataField="XacNhan" HeaderText="Xác nhận" ReadOnly="True" 
                    SortExpression="XacNhan" >
                <ItemStyle HorizontalAlign="Center" />
                </asp:CheckBoxField>
                <asp:CheckBoxField DataField="DaGiao" HeaderText="Đã giao" ReadOnly="True" 
                    SortExpression="DaGiao" >
                <ItemStyle HorizontalAlign="Center" />
                </asp:CheckBoxField>
                <asp:BoundField DataField="TenKhachHang" HeaderText="Tên khách hàng" 
                    ReadOnly="True" SortExpression="TenKhachHang" />
                <asp:BoundField DataField="TenNguoiNhan" HeaderText="Tên người nhận" 
                    ReadOnly="True" SortExpression="TengNguoiNhan" />
                <asp:BoundField DataField="SDTNguoiNhan" HeaderText="SĐT người nhận" 
                    ReadOnly="True" SortExpression="SDTNguoiNhan" />
                <asp:BoundField DataField="DiaChiNguoiNhan" HeaderText="Địa chỉ người nhận" 
                    ReadOnly="True" SortExpression="DiaChiNguoiNhan" />
                <asp:ButtonField ButtonType="Button" CommandName="Select" Text="Select" />
            </Columns>
        </asp:GridView>
        <br />
        <uc1:TH_ChiTietDonDatHangAdmin EnableViewState="false" ID="TH_ChiTietDonDatHangAdmin1" runat="server" />
    </span>
</asp:Content>

